package cn.wolfcode.ssm.domain;

import cn.wolfcode.ssm.util.JSONUtil;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

@Getter@Setter
public class Employee {
    private Long id;

    private String username;

    private String nickname;

    private Long salary;

    public String getJson(){
        Map<Object, Object> map = new HashMap<>();
        map.put("id", id);
        map.put("username", username);
        map.put("nickname", nickname);
        map.put("salary", salary);
        return JSONUtil.toJSONString(map);
    }
}